package com.quality.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import com.quality.business.domain.enums.DictJobEnum;
import lombok.Data;

/**
 * 
 * @TableName dict_job
 */
@TableName(value ="dict_job")
@Data
public class DictJob extends TableFieldAbstract implements Serializable {
    /**
     * 
     */
    @TableField(value = "job_name")
    private String jobName;

    /**
     * 
     */
    @TableField(value = "job_code")
    private String jobCode;

    /**
     * 
     */
    @TableField(value = "parent_code")
    private String parentCode;

    /**
     * 
     */
    @TableField(value = "parent_name")
    private String parentName;

    /**
     * 
     */
    @TableField(value = "level")
    private Integer level;

    /**
     * 
     */
    @TableField(value = "code")
    private String code;

    /**
     * 
     */
    @TableField(value = "name_path")
    private String namePath;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public Object getValue(String field){
        DictJobEnum dictJobEnum = DictJobEnum.valueOf(field);
        switch (dictJobEnum){
            case job_name:
                return this.jobName;
            case job_code:
                return this.jobCode;
            case parent_code:
                return this.parentCode;
            case parent_name:
                return this.parentName;
            case level:
                return this.level;
            case code:
                return this.code;
            case name_path:
                return this.namePath;
            default:
                return "";
        }
    }
}